package com.dogdog.activity;
/*package com.dogdog.activity;

import java.util.ArrayList;
import java.util.List;

import com.dogdog.fragment.Hand_found;
import com.dogdog.fragment.Hand_message;
import com.dogdog.fragment.Hand_person;
import com.dogdog.fragment.Hand_square;

import android.app.Activity;
import android.media.Image;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;

public class Hand_main extends FragmentActivity {

	private ViewPager mviewPager;
	private ImageView img_found;
	private ImageView img_message;
	private ImageView img_square;
	private ImageView img_person;
	private LinearLayout main_found;
	private LinearLayout main_message;
	private LinearLayout main_square;
	private LinearLayout main_person;
	private FragmentPagerAdapter madapter;
	private List<Fragment> mfragment = new ArrayList<Fragment>();
	private int currentIdex;

	@SuppressWarnings({ "deprecation", "deprecation", "deprecation", "deprecation" })
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.hand_main_bar);
		initView();
		madapter = new FragmentPagerAdapter(getSupportFragmentManager()) {

			@Override
			public int getCount() {
				return mfragment.size();
			}

			@Override
			public Fragment getItem(int arg0) {
				return mfragment.get(arg0);
			}
		};
		mviewPager.setAdapter(madapter);
		mviewPager.setOnPageChangeListener(new OnPageChangeListener() {

			@Override
			public void onPageSelected(final int arg0) {
				switch (arg0) {
				case 0:
					img_found.setImageResource(R.drawable.found_selected);
					img_message.setImageResource(R.drawable.message);
					img_square.setImageResource(R.drawable.square);
					img_person.setImageResource(R.drawable.person);
					break;
				case 1:
					img_message.setImageResource(R.drawable.message_selected);
					img_found.setImageResource(R.drawable.found);
					img_square.setImageResource(R.drawable.square);
					img_person.setImageResource(R.drawable.person);
					break;
					case 2:
						img_square.setImageResource(R.drawable.square_selected);
						img_message.setImageResource(R.drawable.message);
						img_found.setImageResource(R.drawable.found);
						img_person.setImageResource(R.drawable.person);
						break;
						case 3:
							img_found.setImageResource(R.drawable.found);
							img_message.setImageResource(R.drawable.message);
							img_square.setImageResource(R.drawable.square);
							img_person.setImageResource(R.drawable.person_selected);
							break;}
			}

			@Override
			public void onPageScrolled(final int arg0, final float arg1, final int arg2) {

			}

			@Override
			public void onPageScrollStateChanged(final int arg0) {
			
				
			}
		});
		mviewPager.setCurrentItem(2);
	}

	private void initView() {
		mviewPager = (ViewPager) findViewById(R.id.tabpager);
		img_found = (ImageView) findViewById(R.id.img_found);
		img_message = (ImageView) findViewById(R.id.img_message);
		img_square = (ImageView) findViewById(R.id.img_square);
		img_person = (ImageView) findViewById(R.id.img_person);
		main_found = (LinearLayout)findViewById(R.id.main_found);
		main_message = (LinearLayout)findViewById(R.id.main_message);
		main_square = (LinearLayout)findViewById(R.id.main_square);
		main_person = (LinearLayout)findViewById(R.id.main_person);
		
		main_found.setOnClickListener(new MyOnClickListener(0));
		main_message.setOnClickListener(new MyOnClickListener(1));
		main_square.setOnClickListener(new MyOnClickListener(2));
		main_person.setOnClickListener(new MyOnClickListener(3));

		Hand_found hand_found = new Hand_found();
		Hand_message hand_message = new Hand_message();
		Hand_person hand_person = new Hand_person();
		Hand_square hand_square = new Hand_square();

		mfragment.add(hand_found);
		mfragment.add(hand_message);
		mfragment.add(hand_square);
		mfragment.add(hand_person);

	}
	private class MyOnClickListener implements OnClickListener{
		private int index = 0;
		public MyOnClickListener (int i){
			index= i;
		}
		@Override
		public void onClick(View arg0) {
			mviewPager.setCurrentItem(index);
		}
	}
}
*/